import Layout from '@/layout'
export default {
    path: '/leaseInformation',
    component: Layout,
    redirect: '/leaseInformation',
    name: 'LeaseInformation',
    meta: {
        title: '租赁合同管理',
        icon: 'clipboard',
    },
    children: [
        {
            path: 'effective',
            component: () => import('@/views/leaseInformation/effective/index.vue'),
            name: 'Effective',
            meta: { title: '有效租赁合同', icon: '' }
        },
        {
            path: 'effective/edit/:id?/:isDisabled?',
            component: () => import('@/views/leaseInformation/effective/edit.vue'),
            name: 'EffectiveEdit',
            beforeEnter: (to, from, next) => {
                if (to.params.id) {
                    to.meta.title = '编辑';
                    if (to.params.isDisabled ==='1') {
                        to.meta.title = '详情';
                    }
                } else {
                    to.meta.title = '新增';
                }
                next();
            },
            meta: {
                title: '新增', // 默认值
                noCache: true,
                activeMenu: `/leaseInformation/effective/index`
            },
            hidden: true
        },
        {
            path: 'termination',
            component: () => import('@/views/leaseInformation/termination/index.vue'),
            name: 'Termination',
            meta: { title: '已终止租赁合同', icon: '' }
        },
        {
            path: 'termination/edit/:id?/:isDisabled?',
            component: () => import('@/views/leaseInformation/termination/edit.vue'),
            name: 'TerminationEdit',
            beforeEnter: (to, from, next) => {
                if (to.params.id) {
                    to.meta.title = '编辑';
                    if (to.params.isDisabled ==='1') {
                        to.meta.title = '详情';
                    }
                } else {
                    to.meta.title = '新增';
                }
                next();
            },
            meta: {
                title: '新增', // 默认值
                noCache: true,
                activeMenu: `/leaseInformation/termination/index`
            },
            hidden: true
        },
    ]
}
